package com.example.myapplication.framework;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface RetrofitService {
//    @FormUrlEncoded
    @POST("home/index")
    Observable<BaseEntity<User>> getUser();

    @FormUrlEncoded
    @POST("loginModule/signUp")
    Observable<BaseEntity<String>> signUp(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("loginModule/logIn")
    Observable<BaseEntity<String>> logIn(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("friendModule/selectFriends")
    Observable<BaseEntity<List<User>>> selectFriends(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("friendModule/addFriend")
    Observable<BaseEntity<User>>addFriend(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("friendModule/selectFriends")
    Observable<BaseEntity<String>> deleteFriend(@FieldMap Map<String, String> map);
}
